package controller;

import model.vo.FoodItem;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: liu
 * Date: 13-6-17
 * Time: 下午3:12
 * To change this template use File | Settings | File Templates.
 */
@Controller
@RequestMapping(value = "/")
public class ContentController {

    private static final String PREFIX = "/";


    @RequestMapping("/content")
    public String getContent(Model model) {
        java.util.List<FoodItem> list=new ArrayList<FoodItem>(10);
        for (int i=0;i<10;i++)
            list.add(new FoodItem());
        model.addAttribute("list",list);
        return PREFIX + "content";
    }

}
